﻿@using Orchard.Mvc;
@using Orchard.Mvc.Html;
@using Orchard.Utility.Extensions;
@{
    Script.Require("jQuery");    
    Script.Require("modernizrLocalStorageGeolocation");
    Script.Require("UserGeolocation");  
    
}
  @using (Script.Foot())
  {
<script type="text/javascript">
    $(document).ready(function () {       
                onMapLoaded();     
    });
    function onMapLoaded() {
        UserGeolocation.ipInfoDbKey = '@Model.ViewModel.IpinfodbKey';
        UserGeolocation.url= '@Href("~/GuangGeolocation")';
        yepnope({
            test: Modernizr.geolocation,
            yep: '@Url.Content("~/Modules/Guang.UserGeolocation/Scripts/geo.js")',
            nope: '@Url.Content("~/Modules/Guang.UserGeolocation/Scripts/geo-polyfill.js")',
            callback: function (url, result, key) {
                  getCurrentLocation();
            }
        });
    }
</script>
  }



